home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / dmake / Localized-Source / buffer.c next >
C/C++ Source or Header  |  1993-01-10  |  429b  |  31 lines

  1.  
  2. /*
  3.  *
  4.  */
  5.  
  6. #include "defs.h"
  7.  
  8. Prototype char *AllocPathBuffer(void);
  9. Prototype void FreePathBuffer(char *);
  10.  
  11.  
  12. List PathBufList = { (Node *)&PathBufList.lh_Tail, NULL, (Node *)&PathBufList.lh_Head };
  13.  
  14. char *
  15. AllocPathBuffer()
  16. {
  17.     Node *node;
  18.  
  19.     if ((node = RemHead(&PathBufList)) == NULL)
  20.     node = malloc(PBUFSIZE);
  21.     return((char *)node);
  22. }
  23.  
  24. void
  25. FreePathBuffer(buf)
  26. char *buf;
  27. {
  28.     AddTail(&PathBufList, (Node *)buf);
  29. }
  30.  
  31.